//一个路由相当于一个mini-express
const express = require('express')
const router = express.Router()

router.get('/', (req, res, next) => {
  res.json(["why", "liming"])
})
router.get('/:id', (req, res, next) => {
  res.json(`${req.params.id}用户信息`)
})
router.post('/', (req, res, next) => {
  res.json('create user success')
})
module.exports = router